<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
		
			function calcDay(year,month,day)
			{
				var daysInMonth = [31, 28 + (year % 4 == 0 && year % 100 != 0 || year % 400 == 0 ? 1 : 0), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
				var totalDays = 0;
				
				for (var i = 0; i < month - 1; i++) {
					totalDays += daysInMonth[i];
				}
				totalDays += day;
				
				return totalDays;
			}
			document.write("2024-04-23是2024年的第"+calcDay(2024,4,23)+"天")
		</script>
	</body>
</html>
